	/**
	 * 删除列表操作
	 * @param obj
	 * @param id
	 * @return
	 */
   function delrow(url,obj,id){
		    var r=confirm("确认删除该信息吗?")
		    url+="?id="+id;
		    if(r){
			   $.ajax({
				        async : false,  
				        cache:false,  
				        type: 'POST',  
				        url: encodeURI(encodeURI(url)),//请求的action路径  
				        error: function () {//请求失败处理函数  
				            alert('请求失败');  
				        },  
				        success:function(data){ //请求成功后处理函数。    
				           if(data=="1"){
				             alert("删除成功!");
				             $(obj).parent().parent().remove();
				           }else if(data=="0"){
				             alert("删除失败!");
				        }
				 }  
		  }); 
	   }
   }
   //递归左侧菜单
   var innertext=""; 
   var hostserver="";
   function drowRowData(data){
	   innertext+="<ul class='submenu'>";
		for(var i=0;i<data.length;i++){
			var row=data[i];
		    innertext+="<li>";
		    innertext+="<a href='"+hostserver+row.url+"'> <i class='icon-double-angle-right'></i>";
		    innertext+=row.name+"</a>";
			if(row.children&&row.children.length>1){
			    innertext+="<b class='arrow icon-angle-down'></b>";
				drowRowData(row.children)
			}
		    innertext+="</li>";
	    }
		innertext+="</ul>";
   }
   
   function  menuInit(host){ 
	   hostserver=host;
		  var url=hostserver+"/admin/auth/menu/loadMenuData?type=menu";
		    $.ajax({
			    url: url, 
				async : false,  
		        cache:false,  
		        type: 'get',  
		        dataType : "json",  
		        error: function (){//请求失败处理函数  
		            alert('请求失败');  
		        },  
		        success:function(data){  
		        	 var arry=eval(data);
        	         for(var i=0;i<arry.length;i++){
        	            var row = arry[i];
        	        	if(row.children.length>0){
        	        	  var currntStr=$("#currentstr").val();
        	        	  if(row.name.indexOf(currntStr)>-1){
        	        		  innertext+="<li class='active open'><a  class='dropdown-toggle'><i class='icon-list'></i><span class='menu-text'>"+row.name+"</span>";
        	        	  }else{
        	        		  innertext+="<li><a  class='dropdown-toggle'><i class='icon-list'></i><span class='menu-text'>"+row.name+"</span>";  
        	        	  }
        	        	  innertext+="<b class='arrow icon-angle-down'></b></a>";
        	        	  drowRowData(row.children);
        	        	}else{
        	        	  innertext+="<li><a href='"+hostserver+row.url+"' class='dropdown-toggle'><i class='icon-list'></i><span class='menu-text'>"+row.name+"</span>";	
        	        	}
        	        	innertext+="</li>";
        	         } 
        	         $("#ul").html(""); 
        	         $("#ul").html(innertext); 
		       }  
		    });  
	 }
  // 后台带查询参数分页
 function pageSubmit(page){
	 $("#pageNum").val(page);
	 $("#myform").submit();
 }
   
 

   